package en.edu.cuit.aumalls.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import cn.edu.cuit.aumalls.entity.SubmitOrders;

public interface SubmitOrderMapper {
	
	@Insert("insert into orders values(REPLACE(UUID(),'-',''),#{order_user},#{order_address},#{order_phone},#{order_name},#{order_status},#{order_price},#{order_time})")
	public int insertOrders(SubmitOrders submitOrders);
	
	@Select("select order_id from orders order by order_time DESC LIMIT 1")
	public String findLastOrder();
	
	@Select("select * from orders order by order_time DESC LIMIT 1")
	public SubmitOrders findPayOrder();
}
